import requests
from lxml import etree
from urllib.parse import quote


lua='''
function main(splash, args)
    local treat = require('treat')
    local response = splash:http_get('https://edu.csdn.net/course')
    return{
        html = treat.as_string(response.body),
    }
end

'''

url = 'http://localhost:8050/execute?lua_source='+quote(lua)
response = requests.get(url)
content = response.json()['html']

html = etree.HTML(content)

kind = html.xpath("//div/a[@class='option-item']/text()")
for i in kind:
    print(i)
